home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 December
/
PCWorld_2006-12_cd.bin
/
audio-video
/
audacity
/
audacity-win-unicode-1.3.2.exe
/
{app}
/
Nyquist
/
profile.lsp
< prev
next >
Wrap
Lisp/Scheme
|
2003-10-01
|
868b
|
31 lines
; profile.lsp -- support for profiling
;## show-profile -- print profile data
(defun show-profile ()
(let ((profile-flag (profile nil)) (total 0))
(dolist (name *PROFILE*)
(setq total (+ total (get name '*PROFILE*))))
(dolist (name *PROFILE*)
(format t "~A (~A%): ~A~%"
(get name '*PROFILE*)
(truncate
(+ 0.5 (/ (float (* 100 (get name '*PROFILE*)))
total)))
name))
(format t "Total: ~A~%" total)
(profile profile-flag)))
;## start-profile -- clear old profile data and start profiling
(defun start-profile ()
(profile nil)
(dolist (name *PROFILE*)
(remprop name '*PROFILE*))
(setq *PROFILE* nil)
(profile t))
; arch-tag: 5b61c530-fbbd-432e-b7a8-9e4a0fa6bfc3